A networking switch receives data packets at ingress ports and forwards the data packets to one or more egress ports. The switch determines the egress port or ports to which the data packets are forwarded dependent on a destination address included in the data packet. A data packet received from an ingress port is stored in memory in the switch before being forwarded.
The memory in the switch may be a shared memory in which all received data packets are stored before being forwarded. As the received data is stored in the shared memory, a data packet pointer; that is, a pointer to the location of the received data in shared memory is stored in one or more queues. The data packet pointer may be queued dependent on the ingress port at which it was received or the egress port at which it is to be transmitted. An output buffered switch queues a data packet pointer dependent on the egress port at which it is to be transmitted.
The shared memory is shared by all the egress ports and a location is randomly allocated to an egress port for storing a received data packet to be forwarded to the egress port. The number of data packets transmitted through each egress port can vary dramatically resulting in temporary congestion in a particular egress port. Temporary congestion may occur at an egress port if data packets received from a plurality of ingress ports are to be forwarded through the same egress port or if there is a speed mismatch between the ingress port and the egress port, for example, the ingress port receives data, at 1 Gigabits per second and the egress port transmits data at 100 Megabits per second.